package com.drcoffee.drcoffeemall.mapper;

import com.drcoffee.drcoffeemall.entry.Attachment;
import com.drcoffee.drcoffeemall.entry.Collect;
import com.drcoffee.drcoffeemall.entry.ProductQuantity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CollectMapper {
    List<Attachment> getCollect(String user_account, String search, String price_type, String language);

    List<Collect> getCollectByattachment_id(@Param("user_account") String user_account, @Param("part_code") String part_code);

    boolean addToCollect(Collect Collect);

    boolean deletePartByCode(@Param("user_account") String user_account, @Param("part_code") List<String> part_code);

    boolean updateQuantityById(Collect Collect);

    List<ProductQuantity> getCollectByAccountAndPartCodes(String account, List<String> partCodes);


}
